#ifndef __DEV_IMU_H
#define __DEV_IMU_H

#include "MPU6050.h"

#define IMU_I2C_SDA 32 
#define IMU_I2C_SCL 33

class IMU
{
private:
    /* data */
    MPU6050 imu;
    uint32_t last_update_time;
    uint32_t last_diff_time;

    int flag;
    int imu_encoder_diff;
    int imu_encoder_state;

public:
    IMU(/* args */);
    ~IMU();

    int16_t ax, ay, az;
    int16_t gx, gy, gz;

    void init();
    void update(int interval);
    int get_imu_encoder_diff();
    int get_imu_encoder_state();
};

extern IMU mpu;

#endif
